chore(dkg): remove summary's transcripts for remote subnets (2/4) - #11221
Draft
pierugo-dfinity wants to merge 1 commit into
Draft
chore(dkg): remove summary's transcripts for remote subnets (2/4)#11221pierugo-dfinity wants to merge 1 commit into
pierugo-dfinity wants to merge 1 commit into
Conversation
pierugo-dfinity
force-pushed
the
pierugo/summary/remove-transcripts-for-remote-subnets-2
branch
from
August 20, 2026 07:32
6b9d747 to
398bad1
Compare
Base automatically changed from
pierugo/summary/remove-transcripts-for-remote-subnets-1
to
master
August 25, 2026 15:07
pierugo-dfinity
force-pushed
the
pierugo/summary/remove-transcripts-for-remote-subnets-2
branch
from
August 25, 2026 15:07
398bad1 to
2c65dfb
Compare
Rachit2323
pushed a commit
to Rachit2323/ic
that referenced
this pull request
Aug 25, 2026
…inity#11220) Since the work performed to speedup the latency of remote DKG requests, their results are delivered as part of data blocks instead of summaries. The `transcripts_for_remote_subnets` field in summaries is thus now unused. This PR begins the migration to remove it entirely. Once it is, the batch delivery can be rewritten more cleanly as we would know that summary heights never contain any consensus responses. We cannot simply replace the field with a `BackwardsCompatible<Vec<_>, _>` (i.e. replace the `Vec<_>` with an `Option<Vec<_>>`) because the field is a `repeated`, and an empty vector is not differentiable from an absent one. In contrast, `Some(vec![])` and `None` have different hashes. For that reason, we need to add a new sentinel field to the protobuf definition that will be set to `true` to explicitely indicate that the field is absent. The entire rollout can be reviewed by looking at the stacked PRs and is described below (together with justifying why upgrades & downgrades are safe). - V0 (current) <-> V1 (after this PR): - The goal of V1 is to keep the exact same representation (including hash) of V0's summaries while still understanding the sentinel and compute the same hash as V2 for V2's summaries. - Upgrade V0 -> V1: A V0's summary doesn't set the sentinel so the field deserializes as `Some(vec![])` and the hash of an empty vector is appropriately computed. - Rollback V1 -> V0: a V1's summary doesn't set the sentinel just yet. V0 does not read it anyways and always includes an empty vector in the hash, same as V1. - V1 <-> V2 ([dfinity#11221](dfinity#11221)): - The goal of V2 is to actually stop hashing an empty vector, and instead just ignore it. - Upgrade V1 -> V2: V2 still understands `Some(vec![])` so will compute V1's summary's hash identically. For its own summaries, it starts to fill the sentinel (because the transcripts are `None`). - Rollback V2 -> V1: V1 understands the sentinel and thus ignores the transcripts while computing the hash. - V2 <-> V3 ([dfinity#11223](dfinity#11223)): - The goal of V3 is to remove the field entirely. - Upgrade V2 -> V3: V3 doesn't know about the transcripts anymore (the field is removed). V2 created a summary with `None` transcripts meaning their hash was not included, good. - Rollback V3 -> V2: V3 unconditionally sets the sentinel to `true`, meaning V2 will interpret the transcripts as `None` and not try to hash them. - V3 <-> V4 ([dfinity#11224](dfinity#11224)): - The goal of V4 is to remove the introduced sentinel field. - Upgrade V3 -> V4: V4 will ignore the sentinel field set by V3. - Rollback V4 -> V3: V3 will deserialize a summary with an unset sentinel, but it does not read it anyways.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Now that all subnets understand the sentinel field, stop hashing an empty vector of transcripts and start populating the sentinel field to declare that intent.